﻿using Draco.DataStructure;

namespace BusinessEntities
{
    public class MetroLine
    {
        public int ID { get; private set; }
        public string Name { get; private set; }

        public D_LinkList<MetroNode> Nodes { get; private set; }

        public D_LinkList<MetroNode> TransferNodes { get; private set; }
        //public D_LinkList<MetroLink> Links { get; private set; }

        public int Color { get; private set; }

        public MetroLine(int id)
        {
            ID = id;
            Name = id + "号线";
            Nodes = new D_LinkList<MetroNode>();
            TransferNodes = new D_LinkList<MetroNode>();

            switch (id)
            {
                case 1:
                    Color = unchecked((int)0xFFFFD200);
                    break;
                case 2:
                    Color = unchecked((int)0xFF0075C8);
                    break;
                case 5:
                    Color = unchecked((int)0xFFD22458);
                    break;
                case 6:
                    Color = unchecked((int)0xFF861054);
                    break;
                case 8:
                    Color = unchecked((int)0xFF0D819B);
                    break;
                default:
                    Color = 0x00000000;
                    break;
            }
        }

        public void AddNode(MetroNode node)
        {
            Nodes.Add(node);
        }

        public void AddTransferNode(MetroNode node)
        {
            TransferNodes.Add(node);
        }

        //public void AddLink(MetroLink link)
        //{
        //    Links.Add(link);
        //}

    }
}
